#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# setup.py for KeyExtracta
# Copyright (C) Nicholas Wilde <ncwilde43@gmail.com>
#
# Description:
# ------------
#    Create Windows excecutable with cx_freeze & setup.py for KeyExtracta
#
# Directions:
# -----------
#  - Install cx_freeze <http://cx-freeze.sourceforge.net/>
#  - use command to compile
#
#      python setup.py build
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

appName = 'KeyExtracta'
appNameLower = appName.lower()
version = '0.1.1'

import sys, re
from cx_Freeze import setup, Executable

# Are we compiling in Windows?
if sys.platform == 'win32':
  base = 'Win32GUI'
else:
  base = 'None'

includefiles = ['README','LICENSE','CHANGELOG','config.cfg']
          
includes = ['sip','sys', 'src', 'string', 'os', 'time', 'core', '_winreg',
            'platform']
            
packages = []
          
excludes = []

exe = Executable(
        script = 'main.py',
        base = base,
        targetName = appName + '.exe',
        copyDependentFiles = True,
        icon = 'src/resources/icon.ico'
)

setup(
  name = appName,
  version = version,
  description = 'Extract CD Keys from the Windows registry.',
  author = u'Nicholas Wilde',
  author_email = 'ncwilde43@gmail.com',
  url = 'http://code.google.com/p/keyextracta/',
  options = {
    'build_exe': {
      'optimize': 2,
      'includes': includes,
      'include_files': includefiles,
      'packages': packages,
      'excludes': excludes
    }
  },
  executables = [exe]
)
